/*
* @Author: wanghongfucoder
* @Date:   2017-04-12 09:51:28
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-04-12 10:33:11
*/

public class InitialContext {
	
	public Object lookup(String jndName){
		if (jndName.equalsIgnoreCase("SERVICE1")) {
		System.out.println("Looking up and creating a new Service1 object");			
		return new Service1();
		}else if(jndName.equalsIgnoreCase("SERVICE2")){
		 System.out.println("Looking up and creating a new Service2 object");
		 return new Serivce2();
		}
	return null;
	}		
}
